package com.starlink.model.util;

import com.starlink.model.dtomapper.SchoolbagReadTestingDtoMapper;
import com.starlink.model.domain.SchoolbagReadTestingDO;
import com.starlink.model.vo.SchoolbagReadTestingVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class SchoolbagReadTestingConvert {

    public static List<SchoolbagReadTestingVO> buildSchoolbagReadTestingVoList(List<SchoolbagReadTestingDO> schoolbagReadTestingDOList) {
        if (CollectionUtils.isEmpty(schoolbagReadTestingDOList)) {
            return Lists.newArrayList();
        }
        List<SchoolbagReadTestingVO> schoolbagReadTestingVOList = new ArrayList<>();
        for (SchoolbagReadTestingDO schoolbagReadTestingDO : schoolbagReadTestingDOList) {
            schoolbagReadTestingVOList.add(SchoolbagReadTestingDtoMapper.INSTANCE.do2VO(schoolbagReadTestingDO));
        }

        return schoolbagReadTestingVOList;
    }
}
